package com.scs.application.modules.wm.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.FlowEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
/**
 * <p>
 *
 * </p>
 */
@Data
@Accessors(chain = true)
@TableName("wm_dist")
@EntityClassAnnotation(remark = "配送表")
@EntityIndexAnnotation(ux = {"bus_key"},ix = {"bus_date", "flow_status"})
public class Dist extends FlowEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "收货科室ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = "收货科室ID"
    )
    private String deptId;

    @EntityFieldAnnotation(
            text = "收货科室名称",
            length = "50",
            not_null = true,
            default_value = "",
            comment = "收货科室名称"
    )
    private String deptName;

    @EntityFieldAnnotation(
            text = "业务单号",
            length = "20",
            not_null = true,
            default_value = "",
            comment = "配送单号"
    )
    private String busKey;

    @EntityFieldAnnotation(
            text = "请领ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String applyId;

    @EntityFieldAnnotation(
            text = "请领单号",
            length = "300",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String applyKey;


    @EntityFieldAnnotation(
            text = "请领人",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String applyUser;

    @EntityFieldAnnotation(
            text = "请领日期",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date applyDate;

    @EntityFieldAnnotation(
            text = "业务日期",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Date busDate;

    @EntityFieldAnnotation(
            text = "业务主办人",
            length = "20",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String busUser;

    @EntityFieldAnnotation(
            text = "业务主办人编码",
            length = "20",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String busUserCode;

    @EntityFieldAnnotation(
            text = "配送仓库ID",
            length = "50",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String warehouseId;

    @EntityFieldAnnotation(
            text = "配送仓库名称",
            length = "50",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String warehouseName;

    @EntityFieldAnnotation(
            text = "拣货和需求比对",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String pickAndDemand;

    @EntityFieldAnnotation(
            text = "配送金额",
            length = "",
            not_null = true,
            default_value = "0.0000",
            comment = ""
    )
    private Double amount;

    @EntityFieldAnnotation(
            text = "拣货人",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String picker;

    @EntityFieldAnnotation(
            text = "拣货日期",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date pickDate;

    @EntityFieldAnnotation(
            text = "拣货状态",
            length = "30",
            not_null = true,
            default_value = "0",
            comment = "拣货状态。0：未拣货，1：开始拣货，2：拣货完成"
    )
    private Integer statusPick;

    @EntityFieldAnnotation(
            text = "收货人",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String receiver;

    @EntityFieldAnnotation(
            text = "科室签名",
            type = EntityFieldType.TEXT,
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String deptSignature;

    @EntityFieldAnnotation(
            text = "备注",
            length = "300",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;


    // creator ,在父类中处理


    // gmt_create ,在父类中处理


    // modifier ,在父类中处理


    // gmt_modified ,在父类中处理

    @EntityFieldAnnotation(
            text = "最近打印时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date printTime;

    @EntityFieldAnnotation(
            text = "是否打印",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "是否打印"
    )
    private Boolean flagPrint;

    @EntityFieldAnnotation(
            text = "序列号",
            length = "10",
            not_null = false,
            comment = "业务审核之后的序列号，打印对单使用"
    )
    private Integer snum;

    @EntityFieldAnnotation(
            text = "单据来源",
            length = "20",
            default_value = "manual",
            not_null = true,
            comment = "dept_apply_auto:由二级库配送需求转换过来的,manual:手动创建的"
    )
    private String sourceType;

    @EntityFieldAnnotation(
            text = "分类",
            length = "10",
            not_null = false,
            default_value = "matr",
            comment = "matr:耗材，reagent：试剂，drugs：药品"
    )
    private String distType;

    //科室地址
    @TableField(exist = false)
    private String deptAddressName;

    @EntityFieldAnnotation(
            text = "试剂组id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = ""
    )
    private String reagentTeamId;

}
